<!-- 用户列表 -->
<template>
    <div class="page-box h100 display-flex czbj">
        <p class="title-label">用户列表</p>
        <div class="mt10">
            <dxtable czWidth="240" :dataJson="dataJson" :portUrl="portUrl" :isshowXz="false" :qx="qx" :czFun="czFun"
                ref="databale">
            </dxtable>
        </div>
    
    </div>
</template>
<script lang='ts' setup>
import dxtable from "../../components/util/dxtable.vue";
import { dxget, dxpost, qurl, hf } from "../../util/index";
import { h, ref, reactive } from "vue";
import { NButton } from "naive-ui"
import expenseCalendar from "./list.vue";
const showModal = ref(false)
const openid = ref()
const initeer = () => {
    databale.value.initDataExpose();
};
const databale = ref();
// 弹窗公用该列表
let dataJson = reactive([

    {
        title: '头像',
        key: 'headimgurl',
        render(row) {
            return h('img', { class: "dsfsdtrtr", src: row.headPortrait })
        }
    },
    {
        title: "昵称",
        key: "nickname",
        search: true, // 是否在搜索栏展示
    },
    {
        title: "openid",
        key: "openid",
    },

    {
        title: "登录ip",
        key: "ip",
    },
    {
        title: "所在城市",
        key: "address",
    },
    


]);
const Userid = localStorage.id
let portUrl = "dxgjAdmin/wxcharUser?Applicationid="+Userid;
const qx = {
    DeletePermissionID: "ArticlePublishingwxcharUserdel", //删除
    EditPermissionIdentifier: "ArticlePublishingwxcharUserbj222", // 编辑
    NewPermissionIdentifier: "ArticlePublishingwxcharUserxz", // 新建
    ViewPermissionID: "ArticlePublishingwxcharUserck", // 查看
};
const czFun = {
    fun: (row) => {
        const userType = row.userType
        return [
           
            h(
                NButton,
                {
                    type: "info",
                    quaternary: true,
                    onClick: async (e) => {
                        hf('ArticlePublishingList?uid='+row.openid)
                    },
                },
                "Ta发布的文章"
            ),
        ];
    },
};
</script>


